package com.imooc.product.service.impl;

import com.imooc.product.dataobject.ProductCategory;
import com.imooc.product.repository.ProductCategoryRepository;
import com.imooc.product.service.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wy
 * @version 1.0
 * @date 2020/3/2 12:24
 * @description
 **/
@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

    @Autowired
    private ProductCategoryRepository productCategoryRepository;

    /**
     * 根据商品编号查找商品
     *
     * @param categoryType
     * @return
     */
    @Override
    public List<ProductCategory> findByCateTypeIn(List<Integer> categoryType) {
        return  productCategoryRepository.findByCategoryTypeIn(categoryType);
    }
}
